// index.js
Page({
  data:{
    banners:[
      "https://tse2-mm.cn.bing.net/th/id/OIP-C.7ygdPT4jauwdvYMU3Xw9dAHaEK?rs=1&pid=ImgDetMain",
      "https://pic1.zhimg.com/v2-1af8daaef08dce58b7d7043000d65cb1_r.jpg",
      "https://img.zcool.cn/community/01ce3c5c1339f1a8012092529769c2.jpg@1280w_1l_2o_100sh.jpg",
      "https://c-ssl.duitang.com/uploads/blog/202105/01/20210501014749_4bb0c.jpeg"
    ],
    articleList:[]
  },
  onLoad(options){
    let that = this
    wx.request({
      url: 'http://192.168.1.49:8080/renren-admin/blog/tparticle/page',
      data:{
        limit:10,
        page:1
      },
      method:'GET',
      success(res){
        that.data.articleList.push(...res.data.data.list)
        // 响应式更新
        that.setData({
          articleList:that.data.articleList
        })
        console.log(res)
      }
    })
  }
})
